package com.bob.clan.wxconnector.schedule;


import com.bob.clan.wxconnector.wxService.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Tasks {

    @Autowired
    private TokenService tokenService;

    @Scheduled(cron = "0 0 * * * ?")
    public void updateRedisTokenHourly() {
        tokenService.updateRedisToken();
    }
}